package com.xique.door.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xique.door.bean.domain.UserProblem;
import com.xique.door.mapper.UserProblemMapper;
import com.xique.door.service.IUserProblemService;
import org.springframework.stereotype.Service;

@Service
public class UserProblemService extends ServiceImpl<UserProblemMapper, UserProblem>
    implements IUserProblemService {

  @Override
  public UserProblem getUserProblemList(UserProblem userProblem) {
    QueryWrapper<UserProblem> queryWrapper = new QueryWrapper<>();
    queryWrapper.eq("problem_id", userProblem.getProblemId());
    queryWrapper.eq("user_id", userProblem.getUserId());
    return baseMapper.selectOne(queryWrapper);
  }
}
